//
//  FileExplorer.Cell.swift
//  SwiftCode
//
//  Created by 于虎拴 on 2023/4/11.
//

import Foundation
import UIKit

extension FileExplorer {
  final class Cell: TableViewCell<String> {
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
      super.init(style: .subtitle, reuseIdentifier: reuseIdentifier)
      selectionStyle = .none
      
      textLabel?.textColor = UIColor.label
      textLabel?.lineBreakMode = .byTruncatingMiddle
    }
    
    required init?(coder: NSCoder) {
      fatalError("init(coder:) has not been implemented")
    }
    
    override func update(_ item: String) {
      textLabel?.text = item
    }
  }

}
